package com.gitee.fdc.adminui.demo.service.impl;

import com.gitee.fdc.adminui.demo.mapper.DemoSingleTableMapper;
import com.gitee.fdc.adminui.demo.domain.DemoSingleTable;
import com.gitee.fdc.adminui.demo.domain.DemoSingleTableSVO;
import com.gitee.fdc.adminui.demo.service.IDemoSingleTableService;
import com.gitee.fdc.base.service.BaseServiceImple;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import org.springframework.transaction.annotation.Transactional;

/**
 * 单样例 服务层实现
 *
 * @author Mr.fdc
 * @date 2019-05-20T08:56:53.535+08:00
 */
@Service
@Transactional(readOnly = true)
public class DemoSingleTableServiceImpl extends BaseServiceImple<DemoSingleTable, Long> implements IDemoSingleTableService {

    @Autowired
    private DemoSingleTableMapper demoSingleTableMapper;

    @PostConstruct
    public void init() {
        super.init(DemoSingleTable.class, demoSingleTableMapper);
    }

    /**
     * 查询单样例列表
     *
     * @param demoSingleTable 单样例信息
     * @return 单样例集合
     */
    @Override
    public List<DemoSingleTable> selectDemoSingleTableList(DemoSingleTableSVO demoSingleTable) {
        this.pageAble();
        return demoSingleTableMapper.selectDemoSingleTableList(demoSingleTable);
    }

    @Override
    public List<DemoSingleTable> fullTextSearch(String keyWords) {
        this.pageAble();
        return demoSingleTableMapper.fullTextSearch(keyWords);
    }

}
